<?php
if (!isset($model))
    $model = new UserLogin();

$this->pageTitle = Yii::app()->name . ' - ' . Yii::t("UserModule.user", "Login");
$this->breadcrumbs = array(
    Yii::t("UserModule.user", "Login"),
);
?>
<section class="noRadius">
    <div class="container">
        <div class="row">
            <div class="span12">                
                <ul class="breadcrumb">
                       <li class="previous"><a href="<?php echo SITE_URL; ?>">Home</a> /</li>
                    <li><a href="javascript:void(0)">Login</a></li>
                </ul>  

                <div class="userElements">
                    <h3 class="addmarginB20"></h3>
                    <div class="common whiteBg greenBor">
                        <div class="padding20px">    
                            <a class="fbLogin" href="<?php echo baseUrl(); ?>user/user/login/<?php echo Message::FACEBOOK_URL; ?>"><img src="<?php echo ThemePath(); ?>/images/fblogin-btn.png"></a>   
                           <a class="fbLogin" href="<?php echo $authUrlGoogle; ?>"><img src="<?php echo ThemePath(); ?>/images/gmaillogin-btn.png"></a>
                            <!--<a class="fbLogin" href="<?php //echo baseUrl(); ?>"><img src="<?php //echo ThemePath(); ?>/images/button-twitter.png" width="250px" style="height:54px;"></a>-->
                        </div>                    	
                    </div>
                    <?php if (Yii::app()->user->hasFlash('loginMessage')): ?>
                    <div class="padding20px addmarginB30 whiteBg greenBor">
                            <div class="success">
                                <?php echo Yii::app()->user->getFlash('loginMessage'); ?>
                            </div></div>
                        <?php endif; ?>
                    <div class="common whiteBg greenBor">
                        
                        <div class="lg-col">
                            <?php echo CHtml::beginForm(); ?>
                            <p class="note"><?php echo Yii::t("UserModule.user", 'Fields with <span class="required">*</span> are required.'); ?></p>
                            <div class="errorMessage">
                                <?php echo CHtml::errorSummary($model); ?>
                            </div>
                            <fieldset>
                                <div class="common">
                                    <div class="col col1">
                                        <label>Username / Email ID <span class="required">*</span></label>
                                        <?php echo CHtml::activeTextField($model, 'username', array('class' => 'field')) ?>
                                    </div>
                                    <div class="col col2">
                                        <label>Password <span class="required">*</span></label>
                                        <?php echo CHtml::activePasswordField($model, 'password', array('class' => 'field')) ?>
                                    </div>
                                    <div class="clear"></div>
                                </div>
                                <?php echo CHtml::submitButton(Yii::t("UserModule.user", "Login"), array('class' => 'btn twoBtn')); ?>

                                <?php echo CHtml::link('Need an account? Sign Up', $this->createAbsoluteUrl('user/registration'), array('class' => 'btn')); ?>
                                <?php echo CHtml::link('Forgot Password?', $this->createAbsoluteUrl('user/recovery'), array('class' => 'floatR addmarginT10')); ?>
                            </fieldset>

                            <?php echo CHtml::endForm(); ?>
                        </div>                    	
                    </div>
                </div>
            </div> </div> </div> </section>               
